package models;

import javax.persistence.Entity;
import javax.persistence.OneToOne;

import play.data.validation.Required;
import play.db.jpa.Model;

/**
 * 菜单模块::一个简单的菜单模块，支持多级菜单，默认为2级菜单
 * 
 * @see BaseModule
 * @since 1.0
 * @author Mr.J.
 * **/
@Entity
public class Menu extends Model implements BaseModule{
	@Required
	public String name;
	
	@OneToOne
	public Menu parent;

	public Menu(String name, Menu parent) {
		super();
		this.name = name;
		this.parent = parent;
	}
}
